package model.components.links.comparator;

import java.util.Comparator;

import model.components.links.link.SdnLink;

public class AvailableBandwidthComparator implements Comparator< SdnLink >
{
	@Override
	public int compare( SdnLink aSoftwareLink, SdnLink bSoftwareLink )
	{
		Integer aSoftwareLinkAvailableBandwidth = Integer.valueOf( (int) aSoftwareLink.getAvailableBW() );
		Integer bSoftwareLinkAvailableBandwidth = Integer.valueOf( (int) bSoftwareLink.getAvailableBW() );
		
		return -aSoftwareLinkAvailableBandwidth.compareTo( bSoftwareLinkAvailableBandwidth );
	}
}
